function GAD_Etom_pMI_Dist_Plot(Placeness_MetaData)
%% Step 1: Collect all Data

% G2_F4_17
[G17_saline] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'saline', 'G2_F4_17', 'AM');
[G17_e2] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 2mg/kg', 'G2_F4_17', 'AM');
[G17_e4] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 4mg/kg', 'G2_F4_17', 'AM');
[G17_e6] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 6mg/kg', 'G2_F4_17', 'AM');
[G17_e7] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 7mg/kg', 'G2_F4_17', 'AM');
[G17_e8] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 8mg/kg', 'G2_F4_17', 'AM');

% G2_F4_18
[G18_saline] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'saline', 'G2_F4_18', 'AM');
[G18_e2] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 2mg/kg', 'G2_F4_18', 'AM');
[G18_e4] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 4mg/kg', 'G2_F4_18', 'AM');
[G18_e6] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 6mg/kg', 'G2_F4_18', 'AM');
[G18_e7] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 7mg/kg', 'G2_F4_18', 'AM');
[G18_e8] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 8mg/kg', 'G2_F4_18', 'AM');

% G2_F5(2)_21
[G21_saline] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'saline', 'G2_F5(2)_21', 'AM');
[G21_e2] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 2mg/kg', 'G2_F5(2)_21', 'AM');
[G21_e4] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 4mg/kg', 'G2_F5(2)_21', 'AM');
[G21_e6] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 6mg/kg', 'G2_F5(2)_21', 'AM');
[G21_e7] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 7mg/kg', 'G2_F5(2)_21', 'AM');
[G21_e8] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 8mg/kg', 'G2_F5(2)_21', 'AM');

% G2_F5(2)_28 (doesn't have data for etomidate 8mg/kg because of total sedation)
[G28_saline] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'saline', 'G2_F5(2)_28', 'AM');
[G28_e2] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 2mg/kg', 'G2_F5(2)_28', 'AM');
[G28_e4] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 4mg/kg', 'G2_F5(2)_28', 'AM');
[G28_e6] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 6mg/kg', 'G2_F5(2)_28', 'AM');
[G28_e7] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 7mg/kg', 'G2_F5(2)_28', 'AM');

% G2_F5(2)_31
[G31_saline] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'saline', 'G2_F5(2)_31', 'AM');
[G31_e2] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 2mg/kg', 'G2_F5(2)_31', 'AM');
[G31_e4] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 4mg/kg', 'G2_F5(2)_31', 'AM');
[G31_e6] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 6mg/kg', 'G2_F5(2)_31', 'AM');
[G31_e7] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 7mg/kg', 'G2_F5(2)_31', 'AM');
[G31_e8] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 8mg/kg', 'G2_F5(2)_31', 'AM');

% G2_F5(2)_34
[G34_saline] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'saline', 'G2_F5(2)_34', 'AM');
[G34_e2] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 2mg/kg', 'G2_F5(2)_34', 'AM');
[G34_e4] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 4mg/kg', 'G2_F5(2)_34', 'AM');
[G34_e6] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 6mg/kg', 'G2_F5(2)_34', 'AM');
[G34_e7] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 7mg/kg', 'G2_F5(2)_34', 'AM');
[G34_e8] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 8mg/kg', 'G2_F5(2)_34', 'AM');

% G2_F5(2)_45
[G45_saline] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'saline', 'G2_F5(2)_45', 'AM');
[G45_e2] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 2mg/kg', 'G2_F5(2)_45', 'AM');
[G45_e4] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 4mg/kg', 'G2_F5(2)_45', 'AM');
[G45_e6] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 6mg/kg', 'G2_F5(2)_45', 'AM');
[G45_e7] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 7mg/kg', 'G2_F5(2)_45', 'AM');
[G45_e8] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 8mg/kg', 'G2_F5(2)_45', 'AM');

% G2_F5(2)_53
[G53_saline] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'saline', 'G2_F5(2)_53', 'AM');
[G53_e2] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 2mg/kg', 'G2_F5(2)_53', 'AM');
[G53_e4] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 4mg/kg', 'G2_F5(2)_53', 'AM');
[G53_e6] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 6mg/kg', 'G2_F5(2)_53', 'AM');
[G53_e7] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 7mg/kg', 'G2_F5(2)_53', 'AM');
[G53_e8] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 8mg/kg', 'G2_F5(2)_53', 'AM');

% G2_F6(2)_36
[G36_saline1] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'saline', 'G2_F6(2)_36', 'AM');
[G36_saline2] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'saline', 'G2_F6(2)_36', 'day1');
G36_saline = cat(1, G36_saline1, G36_saline2);
[G36_e4] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 4mg/kg', 'G2_F6(2)_36', 'AM');
[G36_e7] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 7mg/kg', 'G2_F6(2)_36', 'AM');

% G2_F6(2)_42
[G42_saline] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'saline', 'G2_F6(2)_42', 'AM');
[G42_e7] = pMI_Mean_Dist_One_Animal_One_Dose(Placeness_MetaData, 'etomidate 7mg/kg', 'G2_F6(2)_42', 'AM');

%% Step 2: Organize & Summarize Data

% for WT animals
WT_saline = cat(1, G18_saline, G28_saline, G31_saline, G34_saline, G42_saline); 
for n = 1:size(WT_saline, 2)
    WT_saline_M (1,n) = mean(WT_saline(:,n));
    WT_saline_SE (1,n) = calculate_standard_error(WT_saline(:,n));
end

WT_e2 = cat(1, G18_e2, G28_e2, G31_e2, G34_e2);
for n = 1:size(WT_e2, 2)
    WT_e2_M (1,n) = mean(WT_e2(:,n));
    WT_e2_SE (1,n) = calculate_standard_error(WT_e2(:,n));
end

WT_e4 = cat(1, G18_e4, G28_e4, G31_e4, G34_e4);
for n = 1:size(WT_e4, 2)
    WT_e4_M (1,n) = mean(WT_e4(:,n));
    WT_e4_SE (1,n) = calculate_standard_error(WT_e4(:,n));
end

WT_e6 = cat(1, G18_e6, G28_e6, G31_e6, G34_e6);
for n = 1:size(WT_e6, 2)
    WT_e6_M (1,n) = mean(WT_e6(:,n));
    WT_e6_SE (1,n) = calculate_standard_error(WT_e6(:,n));
end

WT_e7 = cat(1, G18_e7, G28_e7, G31_e7, G34_e7, G42_e7);
for n = 1:size(WT_e7, 2)
    WT_e7_M (1,n) = mean(WT_e7(:,n));
    WT_e7_SE (1,n) = calculate_standard_error(WT_e7(:,n));
end

WT_e8 = cat(1, G18_e8, G31_e8, G34_e8);
for n = 1:size(WT_e8, 2)
    WT_e8_M (1,n) = mean(WT_e8(:,n));
    WT_e8_SE (1,n) = calculate_standard_error(WT_e8(:,n));
end


% for MUT animals
MUT_saline = cat(1, G17_saline, G21_saline, G45_saline, G53_saline, G36_saline); 
for n = 1:size(MUT_saline, 2)
    MUT_saline_M (1,n) = mean(MUT_saline(:,n));
    MUT_saline_SE (1,n) = calculate_standard_error(MUT_saline(:,n));
end

MUT_e2 = cat(1, G17_e2, G21_e2, G45_e2, G53_e2);
for n = 1:size(MUT_e2, 2)
    MUT_e2_M (1,n) = mean(MUT_e2(:,n));
    MUT_e2_SE (1,n) = calculate_standard_error(MUT_e2(:,n));
end

MUT_e4 = cat(1, G17_e4, G21_e4, G45_e4, G53_e4, G36_e4);
for n = 1:size(MUT_e4, 2)
    MUT_e4_M (1,n) = mean(MUT_e4(:,n));
    MUT_e4_SE (1,n) = calculate_standard_error(MUT_e4(:,n));
end

MUT_e6 = cat(1, G17_e6, G21_e6, G45_e6, G53_e6);
for n = 1:size(MUT_e6, 2)
    MUT_e6_M (1,n) = mean(MUT_e6(:,n));
    MUT_e6_SE (1,n) = calculate_standard_error(MUT_e6(:,n));
end

MUT_e7 = cat(1, G17_e7, G21_e7, G45_e7, G53_e7, G36_e7);
for n = 1:size(MUT_e7, 2)
    MUT_e7_M (1,n) = mean(MUT_e7(:,n));
    MUT_e7_SE (1,n) = calculate_standard_error(MUT_e7(:,n));
end

MUT_e8 = cat(1, G17_e8, G21_e8, G45_e8, G53_e8);
for n = 1:size(MUT_e8, 2)
    MUT_e8_M (1,n) = mean(MUT_e8(:,n));
    MUT_e8_SE (1,n) = calculate_standard_error(MUT_e8(:,n));
end

%% plotting 

% define boundary
Upper_Bound=1;
Lower_Bound=0; 
Interval=0.05; 

figure
subplot(2,6,1)
bar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),WT_saline_M,1,'b','FaceAlpha',1);
xlim([0 1]); ylim([0 0.25]);
xlabel('p(MI)');
ylabel('Mean Fraction of Cells');
hold on
er = errorbar((Lower_Bound+0.5*Interval:Interval:Upper_Bound), WT_saline_M, [], WT_saline_SE,'LineWidth',1);    
er.Color = [0 0 0];                            
er.LineStyle = 'None'; 
hold off
set(gca,'FontSize',18); 
title('Saline','FontSize',20);

subplot(2,6,2)
bar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),WT_e2_M,1,'b','FaceAlpha',0.8);
xlim([0 1]); ylim([0 0.25]);
hold on
er = errorbar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),WT_e2_M,[],WT_e2_SE,'LineWidth',1);    
er.Color = [0 0 0];                            
er.LineStyle = 'None';
hold off
set(gca,'FontSize',18); 
title('2mg/kg','FontSize',20);

subplot(2,6,3)
bar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),WT_e4_M,1,'b','FaceAlpha',0.6);
xlim([0 1]); ylim([0 0.25]);
hold on
er = errorbar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),WT_e4_M,[],WT_e4_SE,'LineWidth',1);    
er.Color = [0 0 0];                            
er.LineStyle = 'None';
hold off
set(gca,'FontSize',18); 
title('4mg/kg','FontSize',20);

subplot(2,6,4)
bar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),WT_e6_M,1,'b','FaceAlpha',0.5);
xlim([0 1]); ylim([0 0.25]);
hold on
er = errorbar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),WT_e6_M,[],WT_e6_SE,'LineWidth',1);    
er.Color = [0 0 0];                            
er.LineStyle = 'None';
hold off
set(gca,'FontSize',18); 
title('6mg/kg','FontSize',20);

subplot(2,6,5)
bar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),WT_e7_M,1,'b','FaceAlpha',0.4);
xlim([0 1]); ylim([0 0.25]);
hold on
er = errorbar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),WT_e7_M,[],WT_e7_SE,'LineWidth',1);    
er.Color = [0 0 0];                            
er.LineStyle = 'None';
hold off
set(gca,'FontSize',18); 
title('7mg/kg','FontSize',20);

subplot(2,6,6)
bar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),WT_e8_M,1,'b','FaceAlpha',0.3);
xlim([0 1]); ylim([0 0.25]);
hold on
er = errorbar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),WT_e8_M,[],WT_e8_SE,'LineWidth',1);    
er.Color = [0 0 0];                            
er.LineStyle = 'None';
hold off
set(gca,'FontSize',18); 
title('8mg/kg','FontSize',20);

subplot(2,6,7)
bar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),MUT_saline_M,1,'m','FaceAlpha',1);
xlim([0 1]); ylim([0 0.25]);
xlabel('p(MI)');
ylabel('Mean Fraction of Cells');
hold on
er = errorbar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),MUT_saline_M, [], MUT_saline_SE,'LineWidth',1);    
er.Color = [0 0 0];                            
er.LineStyle = 'None'; 
hold off
set(gca,'FontSize',18); 
% title('\alpha5-i-KO Saline','FontSize',20);

subplot(2,6,8)
bar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),MUT_e2_M,1,'m','FaceAlpha',0.8);
xlim([0 1]); ylim([0 0.25]);
hold on
er = errorbar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),MUT_e2_M,[],MUT_e2_SE,'LineWidth',1);    
er.Color = [0 0 0];                            
er.LineStyle = 'None';
hold off
set(gca,'FontSize',18); 
% title('ETOM 2mg/kg','FontSize',20);

subplot(2,6,9)
bar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),MUT_e4_M,1,'m','FaceAlpha',0.6);
xlim([0 1]); ylim([0 0.25]);
hold on
er = errorbar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),MUT_e4_M,[],MUT_e4_SE,'LineWidth',1);    
er.Color = [0 0 0];                            
er.LineStyle = 'None';
hold off
set(gca,'FontSize',18); 
% title('ETOM 4mg/kg','FontSize',20);

subplot(2,6,10)
bar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),MUT_e6_M,1,'m','FaceAlpha',0.5);
xlim([0 1]); ylim([0 0.25]);
hold on
er = errorbar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),MUT_e6_M,[],MUT_e6_SE,'LineWidth',1);    
er.Color = [0 0 0];                            
er.LineStyle = 'None';
hold off
set(gca,'FontSize',18); 
% title('ETOM 6mg/kg','FontSize',20);

subplot(2,6,11)
bar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),MUT_e7_M,1,'m','FaceAlpha',0.4);
xlim([0 1]); ylim([0 0.25]);
hold on
er = errorbar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),MUT_e7_M,[],MUT_e7_SE,'LineWidth',1);    
er.Color = [0 0 0];                            
er.LineStyle = 'None';
hold off
set(gca,'FontSize',18); 
% title('ETOM 7mg/kg','FontSize',20);

subplot(2,6,12)
bar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),MUT_e8_M,1,'m','FaceAlpha',0.3);
xlim([0 1]); ylim([0 0.25]);
hold on
er = errorbar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),MUT_e8_M,[],MUT_e8_SE,'LineWidth',1);    
er.Color = [0 0 0];                            
er.LineStyle = 'None';
hold off
set(gca,'FontSize',18); 
% title('ETOM 8mg/kg','FontSize',20);


end